from models import *
import numpy as np
from mindspore import Tensor

class ZerosPadding3(nn.Cell):
    def __init__(self):
        super(ZerosPadding3, self).__init__()
        # self.padding = nn.Pad(paddings=((1, 1), (0, 0)), mode="CONSTANT")
    def construct(self, x):
        B, C, H, W = x.shape
        pad = ops.Zeros()((B, C, 1, W), ms.float32)
        x = ops.Concat(2)((pad, x, pad))
        return x

net = ZerosPadding2()
input = np.random.randn(128, 250, 32, 1).astype(np.float32)
out = net(Tensor(input))
out = out[0]
out = out[0]
print(out)